
#include <iostream>
#include<iomanip>
#include<cmath>
using namespace std;
float scanf_ggh(int q, int w, int t, int y, int u, int i)
{
    float i1 = sqrt((t - q) * (t - q) + (y - w) * (y - w));
    float i2 = sqrt((u - t) * (u - t) + (i - y) * (i - y));
    float i3 = sqrt((u - q) * (u - q) + (i - w) * (i - w));
    float h = i1 + i2 + i3;
    return h;
}
int main() {
    int a = 0;
    int b = 0;
    int c = 0;
    int d = 0;
    int e = 0;
    int f = 0;
    cin >> a >> b >> c >> d >> e >> f;

    scanf_ggh(a, b, c, d, e, f);
    cout << setprecision(2) << std::fixed;
    cout << scanf_ggh(a, b, c, d, e, f) << endl;
    return  0;






}